package homework;

import java.util.List;
import java.io.File;
import java.util.Collections;

import cn.hutool.core.io.FileUtil;

public class Work1 {
	public static void main(String[] args) throws Exception {
		File file = FileUtil.file("..\\sort.txt");
		List<String> lines = FileUtil.readLines(file, "utf-8");
		Collections.sort(lines, (o1,o2)->o1.charAt(0)-o2.charAt(0));
		FileUtil.writeLines(lines, file, "utf-8");
	}
}
